import mitmproxy.http
from xiaohongshu import xiaohongshu
from douyin import douyin
from kuaishou import kuaishou

class mobildSpider(object):
    def __index__(self):
        print("===============================================")
    def request(self, flow: mitmproxy.http.flow):
        url = flow.request.url
        # print(url)
    def response(selfse, flow: mitmproxy.http.flow):
        print('==============host=============================' + flow.request.host)
        print('================================================' + str(flow.request.url.find(kuaishou.searchUserPath) >= 0))
        if flow.request.url.startswith(xiaohongshu.xhsHttp):
            xiaohongshu.xhsSearch(flow)
        # elif flow.request.url.startswith(douyin.douyinHttp):
        #     douyin.dySearch(flow)
        # elif flow.request.url.find(kuaishou.searchUserPath) >= 0:
        #     kuaishou.ksSearch(flow)
